package main

import (
	"context"
	"fmt"
	"gcc/log"
	"gcc/service"
	stlog "log"
)

func main(){
	log.Run("./distributed.log")
	host, port := "localhost","4000"
	ctx, err := service.Start(
		context.Background(),
		"Log service",
		host,
		port,
		log.RegisterHandlers,
	)

	if err != nil {
		stlog.Fatalln(err)
	}
	<- ctx.Done()

	fmt.Println(("shutting down log service"))
}